package com.iter.devbox.juc;

import java.util.concurrent.BlockingDeque;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.LinkedBlockingDeque;
import java.util.concurrent.LinkedBlockingQueue;

public class MyBlockingDeque {

	public static void main(String[] args) throws Throwable {
		BlockingDeque<Integer> blockingDeque = new LinkedBlockingDeque<Integer>();
		for (int i=0; i<10; i++) {
			blockingDeque.add(i);
		}
		System.out.println(blockingDeque.takeFirst());
		
		BlockingQueue<Integer> blockingQueue = new LinkedBlockingQueue<Integer>();
		System.out.println(blockingQueue.peek());
		
		ConcurrentMap<String, String> concurrentMap = new ConcurrentHashMap<String, String>();
		concurrentMap.put("key", "1");
		System.out.println(concurrentMap.get("key"));
	}
}